home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / strategy / xpat2-1.000 / xpat2-1 / xpat2-1.04 / src / xpat.h < prev    next >
C/C++ Source or Header  |  1995-10-14  |  20KB  |  483 lines

  1. /*****************************************************************************/
  2. /*                                         */
  3. /*                                         */
  4. /*    X patience version 2 -- module xpat.h                     */
  5. /*                                         */
  6. /*    Copyright (C) 1993, 1994 by Heiko Eissfeldt and Michael Bischoff     */
  7. /*                                         */
  8. /*
  9.     This program is free software; you can redistribute it and/or modify
  10.     it under the terms of the GNU General Public License as published by
  11.     the Free Software Foundation; either version 2 of the License, or
  12.     (at your option) any later version.
  13.  
  14.     This program is distributed in the hope that it will be useful,
  15.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.     GNU General Public License for more details. (The file COPYRIGHT.GNU)
  18.  
  19.     You should have received a copy of the GNU General Public License
  20.     along with this program; if not, write to the Free Software
  21.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.             */
  22. /*                                         */
  23. /*                                         */
  24. /*    This file is included by all source files of xpat.             */
  25. /*    24-Feb-1993: First release (0.1)                     */
  26. /*    04-May-1993: starting to work on 0.7                     */
  27. /*            file renamed to xpat.h from gpat.h             */
  28. /*    29-Jan-1994: Release 1.0                                   */
  29. /*                                         */
  30. /*    02-Apr-1994: Reworked and commented this file, with xpat version 2   */
  31. /*            in mind.                         */
  32. /*                                         */
  33. /*                                         */
  34. /*****************************************************************************/
  35. #include <stdio.h>
  36. #include <stdlib.h>
  37. #include <string.h>
  38. #include <ctype.h>
  39. #include <assert.h>
  40. #include <stdarg.h>
  41.  
  42. #ifndef EXIT_FAILURE    /* poor old SUN's */
  43. #define EXIT_FAILURE (-1)
  44. #endif
  45.  
  46. #ifndef max
  47. #define max(a, b)     ((a) > (b) ? (a) : (b))
  48. #define min(a, b)     ((a) < (b) ? (a) : (b))
  49. #endif
  50.  
  51. typedef int boolean;            /* just one bit of information           */
  52. typedef int Cardindex;        /* range from 0 to MAXCARDS-1            */
  53. typedef int Pileindex;        /* range from 0 to MAXPILES              */
  54. typedef int Card;        /* range from 0 to 51, plus CARDBACK...  */
  55. typedef unsigned long Move;
  56. typedef enum { Stack, Slot, FaceupDeck, FacedownDeck, Tmp } Pile;
  57. typedef enum { Club, Spade, Heart, Diamond } Suit;
  58. typedef enum { Ace, Deuce, Three, Four, Five, Six, Seven, Eight,
  59.            Nine, Ten, Jack, Queen, King } Rank;
  60.  
  61.  
  62. struct key_action {
  63.     char *string;
  64.     void (*action)(void);
  65.     struct key_action *next;
  66. };
  67.  
  68. extern const char *langdir;    /* a slash, then the name of a subdir */
  69.  
  70. #define True        1
  71. #define False        0
  72.  
  73. #define MAXCARDS    (Cardindex)504
  74. #define MAXPILES    (Pileindex)63
  75.  
  76. /* The rules structure describes the current set of rules. The game.in this
  77.    structure is not modified during a game, not even when selecting 'new game'.
  78.    The game.is copied into the structure by the loadgame() and new_rules()
  79.    functions. The major part is just a copy of the standard description of the
  80.    rule set with the given name. Some entries are customised then. (For
  81.    example, the number of slots.)
  82.    Pointer entries marked as optional can be omitted (i.e. set to NULL) without
  83.    making the game crash. */
  84.  
  85. extern struct rules {
  86.     const char *shortname;    /* Identifier to select a rule set. It appears
  87.                    in the menus and is used for the icon name.
  88.                    */
  89.     const char *longname;    /* Optional. This can be a longer description,
  90.                    which is used for the window title in the
  91.                    Xlib version. */
  92.     const char *abbrev;        /* Optional. Abbreviation for `shortname', for
  93.                    rule sets with spaces or very long names. */
  94.     int layout_hints;        /* This is a classification of the games, which
  95.                    is mainly used by the layout function to
  96.                    find a nice setting. The current values are
  97.                    0: Gypsy, Spider, Klondike
  98.                    1: FreeCell, SeaHaven (no Deck, Tmp instead)
  99.                    2: Idiot's Delight     (Just one stack)
  100.                    3: Monte Carlo    (layout must be fixed!)
  101.                    4: Midnight Oil
  102.                    5: Michael's Fantasy
  103.                    6: Royal Cotillion
  104.                    7: Baker's Dozen */
  105.     int variant;        /* storage for some game parameters which don't
  106.                    fit anywhere else. */
  107. #define DECK_SOURCE    0x0001    /* has visible deck from which single cards can
  108.                    be moved (Klondike) */
  109. #define HINTS_LESSER    0x0002    /* only display hints, if their dst pile has
  110.                    a lesser index than the srcpile (MonteCarlo)
  111.                    */
  112. #define STACKS_MULTI    0x0004    /* show hints for multiple move to stack */
  113. #define NODEAL        0x0008    /* this type of game has no 'deal cards' or
  114.                    equivalent */
  115. #define DECK_VISIBLE    0x0010    /* topmost card of the deck is visible */
  116. #define AUTOFILL_TMPS    0x0020    /* tmp spaces are filled from vdeck or ideck */
  117. #define KLONDIKE_DEAL    0x0040    /* Klondike-type of dealing cards */
  118.  
  119.     int customizable;        /* These bits specify, which game parameters
  120.                    may be customized. */
  121.     int customized;        /* These bits specify, which game parameters
  122.                    actually are customized. */
  123. #define CUSTOM_DECKS    0x001
  124. #define CUSTOM_SLOTS    0x002
  125. #define CUSTOM_FACEUP    0x004
  126. #define CUSTOM_FACEDOWN    0x008
  127. #define CUSTOM_JOKERS    0x010
  128. #define CUSTOM_TMPS    0x020
  129. #define CUSTOM_STD    0x03f    /* everything above ORed together */
  130. #define CUSTOM_PARAM0    0x040
  131. #define CUSTOM_PARAM1    0x080
  132. #define CUSTOM_PARAM2    0x100
  133. #define CUSTOM_PARAM3    0x200
  134.  
  135.     /* Now comes a block with the game parameters */
  136.     Cardindex numcards;        /* usually 52 or 104 (may be more, if jokers
  137.                    are used) */
  138.     Pileindex numstacks;    /* number of stacks, usually twice the number
  139.                    of decks */
  140.     Pileindex numslots;        /* number of slots */
  141.     Pileindex numtmps;        /* number of temporary storages */
  142.     int numdecks;        /* number of decks */
  143.     int cards_per_color;    /* usually 13. This entry is not supported yet.
  144.                    It will be used to support decks ranking
  145.                    7,8,9,10,jack,queen,king,ace */
  146.     int numjokers;        /* number of jokers. generally 0 */
  147.  
  148.     /* The following parameters may serve different purposes in different rule
  149.        sets, so their name doesn't give too much info. With every parameter,
  150.        there may be assigned a corresponding counter, in which case the
  151.        parameter is used to initialise the counter. This feature can be used
  152.        for special actions which are allowed only a limited number of times
  153.        per game. Examples are flipping the deck in the Klondike game or
  154.        shuffling the slots in Midnight Oil */
  155.     int param[4];
  156.  
  157.     int facedown;        /* number of cards facedown in each slot at */
  158.                 /* beginning of game (rounded down) */
  159.     int faceup;            /* number of cards faceup */
  160.     int newgame_bits;        /* Directions to the generic newgame function,
  161.                    in case you don't have your own function. */
  162. #define SEQUENTIAL    0x0200    /* Fill slots from beginning to end */
  163. #define SLOTS_SAME    0x0400    /* All slots same number of cards */
  164. #define FORCE_SLOTS    0x0800    /* Extra cards on slots (FreeCell) */
  165.     void (*new_game)(void);    /* Optional: Initialize a new game. In case
  166.                    you supply your own function, you may
  167.                    redefine the meaning of the newgame_bits
  168.                    entry for your own. */
  169.     int (*game_won)(void);    /* Optional: If the winning condition is
  170.                    different from: `all non-jokers on the
  171.                    stacks' */
  172.     int (*new_cards)(void);    /* Optional: check if it is possible to deal
  173.                    new cards or perform a similar action
  174.                    (shuffle, Midnight Oil).
  175.                    The default behaviour is to allow dealing
  176.                    cards, if there are any left. */
  177.     int move_bits;        /* hints about the validity of moves */
  178. #define ES_MASK        0x0003    /* moves to empty slots */
  179. #define ES_NONE        0x0000    /* no move to empty slots allowed.
  180.                    (Midnight Oil) */
  181. #define ES_KINGS    0x0001    /* only kings may go there (Klondike) */
  182. #define ES_ALL        0x0002    /* all cards are allowed (Gypsy, Spider) */
  183.  
  184. #define US_MASK        0x000c    /* moves to used slots */
  185. #define US_NONE        0x0000    /* no move to used slots allowed */
  186. #define US_RS        0x0004    /* rank and suit must match
  187.                    (Midnight Oil, Seahaven) */
  188. #define US_RA        0x0008    /* rank and alternate colour
  189.                    (Gypsy, FreeCell, Klondike) */
  190. #define US_R        0x000c    /* rank and any suit (Spider) */
  191.  
  192. #define MG_MASK        0x0030    /* move groups */
  193. #define MG_NONE        0x0000    /* only single cards may be moved */
  194. #define MG_RS        0x0010    /* rank and suit (Spider) */
  195. #define MG_RA        0x0020    /* rank and alternate colour
  196.                    (Gypsy, Klondike) */
  197. #define MG_R        0x0030    /* rank and any suit (currently not needed) */
  198.  
  199. #define DC_MASK        0x00c0    /* deal cards valid? */
  200. #define DC_ALWAYS    0x0000    /* always deal cards possible, if cards are
  201.                    are there */
  202. #define DC_NOEMPTY    0x0040    /* only deal cards, if no empty slots (Spider)
  203.                    */
  204. #define DC_STRONGOK    0x0080    /* only deal, if all slots are very fine */
  205. #define DC_RELAXEDOK    0x00c0    /* only deal, if all slots are nearly fine */
  206.  
  207. #define ST_MASK        0x0300
  208. #define ST_NONE        0x0000    /* no cards explicitly movable to stack */
  209. #define ST_ONE        0x0100    /* move single cards to stacks if matches */
  210. #define ST_13        0x0200    /* only full sequence is stackable */
  211.  
  212. #define STACK_SOURCE    0x4000    /* stack can be source of move */
  213.  
  214.  
  215.     Move (*deal_cards)(void);    /* Optional: custom card dealing function */
  216.     void (*undeal_cards)(int);    /* Optional: custom card undealing function */
  217.     Cardindex (*stackable)(Pileindex); /* Optional: custom function to select
  218.                    a group of cards which may be movable to a
  219.                    stack. The function should return the index
  220.                    of the first card to be moved, or -1, if
  221.                    no cards are stackable. */
  222.     int (*movevalid)(Cardindex, Pileindex); /* Optional: In case the above
  223.                    bits are not sufficient to decide about
  224.                    a move, you can define your own function.
  225.                    (Idiot's Delight, Monte Carlo) */
  226.     int (*valid)(Card, Card);    /* Optional: A function to decide if a group
  227.                    of cards may be moved in one turn */
  228.     int (*relaxed_valid)(Card, Card); /* Optional: A function to decide if a
  229.                    group of cards is in sequence in the relaxed
  230.                    sense */
  231.     int (*good_hint)(Cardindex, Pileindex); /* Optional. May return a value
  232.                    of the specified move. Hints are sorted
  233.                    in descending order of their estimated
  234.                    value. If this function is not supplied,
  235.                    all hints are considered to be of equal
  236.                    value. The auto-play function stops, if
  237.                    a move's value does not reach a given bound.
  238.                    */
  239.     int (*automove)(Cardindex);    /* Optional: a function to select a destination
  240.                    pile for the given sequence of cards. should
  241.                    return 0, if the specified card(s) cannot be
  242.                    moved anywhere. The default function should
  243.                    do in most cases */
  244.     int (*score)(void);        /* Optional: a score routine */
  245.     int maxscore;        /* Optional: maximum score reachable */
  246.     int paramstring[4];        /* Optional: used to print out counter[1..3] */
  247.     int inited;            /* set to nz when rules are used */
  248.     void (*initfunc)(void);    /* function to be called if rules are inited */
  249.     struct key_action *local_bindings;
  250. } rules;
  251.  
  252.  
  253.  
  254. /* only parts of this structure are saved: */
  255. extern struct game {
  256.     long seed;            /* seed of this game               */
  257.     boolean finished;        /* was this game once finished?           */
  258.     boolean randomgame;        /* was the seed explicitly given       */
  259.     Card cards[MAXCARDS];    /* array of the cards (0..51, 60..62?)       */
  260.     Pile piletype[MAXPILES];    /* what sort of pile this is               */
  261.     Cardindex ind[MAXPILES+1];    /* stacks + slots + deck + terminator      */
  262.     boolean visible[MAXCARDS];  /* True, if a card is face-up              */
  263.     int n_moves;        /* currently used moves                    */
  264.     int stored_moves;        /* ptr, for redo and store_move            */
  265.     int move_ptr;        /* ptr, points to current_move             */
  266.     int cheat_count;        /* number of undos which turned back cards */
  267.     int savecount;        /* How often was this game saved?       */
  268.     int counter[4];        /*  */
  269.     /* here begins the old data structure */
  270.     int numpiles;        /* number of piles in this game           */
  271.     int bookmark;        /* move number of bookmark           */
  272.     Cardindex srcind;
  273. #define UNSELECTED    (-1)
  274. #define ROTATE_UP_SEL    (-2)
  275. #define ROTATE_DOWN_SEL    (-3)
  276.     Cardindex arrow_srcind;
  277.     Pileindex arrow_dstpile;
  278.     boolean graphic;
  279.     int pile_changed[MAXPILES];
  280.     int numalloc;        /* space allocated for stored moves        */
  281.     Move *move;            /* pointer to moves                        */
  282.     int disable[MAXPILES];    /* disable bits                           */
  283. } game;
  284. #define PILE_UNCHANGED    0x7fff
  285.  
  286. #define SUIT(i)            ((i) & 3)
  287. #define RANK(i)            ((i) >> 2)
  288. #define JOKER            60
  289. #define IS_JOKER(i)        ((i) >= JOKER)
  290. #define INDEX_OF_LAST_CARD(i)    (game.ind[(i)+1]-1)
  291. #define    INDEX_OF_FIRST_CARD(i)    game.ind[i]
  292. #define STACK(i)        (i)
  293. #define SLOT(i)            ((i) + rules.numstacks)
  294. #define IDECK            (game.numpiles-1)
  295. #define VDECK            (game.numpiles-2)
  296. #define IS_STACK(i)        ((i) < rules.numstacks)
  297. #define IS_SLOT(i)        (game.piletype[i] == Slot)
  298. #define CARDS_ON_PILE(i)    (game.ind[(i)+1] - game.ind[(i)])
  299. #define EMPTY(i)        (!CARDS_ON_PILE(i))
  300. #define FIRST_SLOT        (rules.numstacks)
  301. #define LAST_SLOT        (rules.numstacks+rules.numslots-1)
  302. #define FIRST_STACK        0
  303. #define LAST_STACK        (rules.numstacks-1)
  304. #define CARDS_ON_DECK        (rules.numcards - game.ind[IDECK])
  305.  
  306.  
  307. /* Prototypes: */
  308.  
  309. /* Prototypes of the Xlib interface / widget that are known to the game: */
  310. /* (these should go into a different .h file) */
  311. #if SOUND
  312. int checksound(void);
  313. void play_sound(const char *);
  314. #else
  315. #define play_sound(x)
  316. #endif
  317. void move_card_data(Cardindex dst, Cardindex src);    /* cards.c */
  318. void draw_pileupdate(Pileindex pile, int delta);
  319. boolean pile_resize(Pileindex);
  320. void new_rules_notify(void);
  321. void win_game(void);                    /* ? */
  322. void refresh_screen(void); /* request complete redraw */ /* ? */
  323. void show_arrow(boolean);  /* show/hide the hint arrow */
  324. void show_mark(boolean);    /* markcard.c */
  325. void show_message(const char *, ...);
  326. void request_confirm(void (*dofunc)(void), const char *prompt);
  327.  
  328. /* Prototypes of the game that are known to the Xlib interface / widget: */
  329.  
  330. typedef enum { Disable, Enable, EnableAndRedraw } GraphicsControl;
  331. void graphics_control(GraphicsControl cmd);
  332. void graphics_pile_control(GraphicsControl cmd, Pileindex pile);
  333. Pileindex getpile(Cardindex);
  334. void key_pressed(char *str);
  335. void button_pressed(Pileindex pile, Cardindex card, int button);
  336. void switch_uid(int);
  337. void save_game(const char *);
  338. void load_game(const char *);
  339. void new_rules(const char *, int, Pileindex, int, int, int, int, int, int, int, int);
  340. void newgame(long);
  341. void change_rules(const char *new_rules_name);
  342. void *malloc_(size_t);
  343. char *strsav(const char *);
  344.  
  345. /* commands (which can be assigned to buttons */
  346. void rq_LeavePat(void);
  347. void rq_RestartGame(void);
  348. void rq_AnotherGame(void);
  349. void cmd_ResetHints(void);
  350. void cmd_DoHint(void);
  351. void cmd_NextHint(void);
  352. void cmd_PreviousHint(void);
  353. void cmd_CancelSelection(void);
  354. void cmd_AllMoves(void);
  355. void cmd_UndoMove(void);
  356. void cmd_RedoMove(void);
  357. void cmd_DealCards(void);
  358. void cmd_LeavePat(void);
  359. void cmd_ShowScore(void);
  360. void cmd_AnotherGame(void);
  361. void cmd_RestartGame(void);
  362. void cmd_ReplayGame(void);
  363. void cmd_Layout(void);
  364. void cmd_SaveGame(void);
  365. void cmd_ShowVersion(void);
  366. void cmd_ToStack(void);
  367. void cmd_OneToStack(void);    /* selected card(s) */
  368. void cmd_AllToStack(void);    /* all possible */
  369. void cmd_DropBookmark(void);
  370. void cmd_GotoBookmark(void);
  371. void cmd_Cancel(void);
  372. void cmd_Confirm(void);
  373. void cmd_Info(void);
  374. void cmd_MinWindow(void);
  375. void cmd_PreferredWindow(void);
  376. void cmd_RotateUp(void);
  377. void cmd_RotateDown(void);
  378.  
  379. /* Messages -- internationalisation */
  380. void read_message_file(const char *filename);
  381. void read_keyboard_file(const char *filename);
  382. void add_keybinding(struct key_action **cp, const char *cmd, const char *function);
  383. struct rules *getrules(const char *ruleset);
  384.  
  385. extern const char *US_rank_name[], *US_suit_name[];
  386. extern const char *xpat_messages[];
  387. #define TXT_QUIT_CONFIRM    (xpat_messages[0])
  388. #define TXT_NEW_CONFIRM        (xpat_messages[1])
  389. #define TXT_RESTART_CONFIRM    (xpat_messages[2])
  390. #define TXT_SUIT        (xpat_messages+3)
  391. #define TXT_SUIT0        (xpat_messages[3])
  392. #define TXT_SUIT1        (xpat_messages[4])
  393. #define TXT_SUIT2        (xpat_messages[5])
  394. #define TXT_SUIT3        (xpat_messages[6])
  395. #define TXT_JOKER        (xpat_messages[7])
  396. #define TXT_RANK        (xpat_messages+8)
  397. #define TXT_ACE            (xpat_messages[8])
  398. #define TXT_DEUCE        (xpat_messages[9])
  399. #define TXT_THREE        (xpat_messages[10])
  400. #define TXT_FOUR        (xpat_messages[11])
  401. #define TXT_FIVE        (xpat_messages[12])
  402. #define TXT_SIX            (xpat_messages[13])
  403. #define TXT_SEVEN        (xpat_messages[14])
  404. #define TXT_EIGHT        (xpat_messages[15])
  405. #define TXT_NINE        (xpat_messages[16])
  406. #define TXT_TEN            (xpat_messages[17])
  407. #define TXT_JACK        (xpat_messages[18])
  408. #define TXT_QUEEN        (xpat_messages[19])
  409. #define TXT_KING        (xpat_messages[20])
  410. #define TXT_STACK        (xpat_messages[21])
  411. #define TXT_SLOT        (xpat_messages[22])
  412. #define TXT_DECK        (xpat_messages[23])
  413. #define TXT_TMP            (xpat_messages[24])
  414. #define TXT_IDECK        (xpat_messages[25])
  415. #define TXT_NOHINTGIVEN        (xpat_messages[26])
  416. #define TXT_CANMOVE        (xpat_messages[27])
  417. #define TXT_NOHINTS        (xpat_messages[28])
  418. #define TXT_WRAPPING        (xpat_messages[29])
  419. #define TXT_BOOKMARK_SET    (xpat_messages[30])
  420. #define TXT_YOU_WIN        (xpat_messages[31])
  421. #define TXT_NONE_TO_STACK    (xpat_messages[32])
  422. #define TXT_SAVE_ERR_BASIC    (xpat_messages[33])
  423. #define TXT_LOAD_ERR_BASIC    (xpat_messages[34])
  424. #define TXT_SAVE_ERR_OPEN    (xpat_messages[35])
  425. #define TXT_LOAD_ERR_OPEN    (xpat_messages[36])
  426. #define TXT_SAVE_ERR_HEADER    (xpat_messages[37])
  427. #define TXT_LOAD_ERR_HEADER    (xpat_messages[38])
  428. #define TXT_SAVE_ERR_MOVES    (xpat_messages[39])
  429. #define TXT_LOAD_ERR_MOVES    (xpat_messages[40])
  430. #define TXT_SAVE_OK        (xpat_messages[41])
  431. #define TXT_LOAD_OK        (xpat_messages[42])
  432. #define TXT_LOAD_ERR_BADMAGIC    (xpat_messages[43])
  433.  
  434. #define TXT_FLIPPING        (xpat_messages[45])
  435. #define TXT_NEWCARDS        (xpat_messages[46])
  436. #define TXT_NONEWCARDS        (xpat_messages[47])
  437. #define TXT_NOSOURCEPILE    (xpat_messages[48])
  438. #define TXT_MOVED_TO_STACK    (xpat_messages[49])
  439. #define TXT_MOVENOTPOSSIBLE    (xpat_messages[50])
  440. #define TXT_NOUNDO        (xpat_messages[51])
  441. #define TXT_UNDO        (xpat_messages[52])
  442. #define TXT_UNDOCHEAT        (xpat_messages[53])
  443. #define TXT_NOREDO        (xpat_messages[54])
  444. #define TXT_REDO        (xpat_messages[55])
  445. #define TXT_REDOUNCHEAT        (xpat_messages[56])
  446. #define TXT_INVALIDMOVE        (xpat_messages[57])
  447. #define TXT_BADSRC        (xpat_messages[58])
  448. #define TXT_SRCSELECTED        (xpat_messages[59])
  449. #define TXT_BADSLOT        (xpat_messages[60])
  450. #define TXT_ABORTED        (xpat_messages[61])
  451. #define TXT_BADCMD        (xpat_messages[62])
  452. #define TXT_NOMOVE        (xpat_messages[63])
  453. #define TXT_VERSION        (xpat_messages[64])
  454. #define TXT_INFO1        (xpat_messages[65])
  455. #define TXT_SCORE        (xpat_messages[66])
  456. #define TXT_NOSCORE        (xpat_messages[67])
  457. #define TXT_CARDSLEFT        (xpat_messages[68])
  458. #define TXT_HELP_KEYS        (xpat_messages[69])
  459. #define TXT_HELP_RULES        (xpat_messages[70])
  460. #define TXT_HELPFILES        (xpat_messages+71)
  461.  
  462.  
  463.  
  464. #define TXT_LOADING        (xpat_messages[92])
  465. #define TXT_WELCOME        (xpat_messages[93])
  466.  
  467. #define TXT_ROTUP         (xpat_messages[95])
  468. #define TXT_ROTDN         (xpat_messages[96])
  469. #define TXT_SLOTREQUIRED    (xpat_messages[97])
  470. #define TXT_CARDNOTVISIBLE    (xpat_messages[98])
  471.  
  472. #define TXTI_SHUFFLE        100    /* block of 4 messages */
  473. #define TXTI_FLIP        104    /* " */
  474. #define TXTI_ROTATE         108    /* " */
  475. #define TXTI_CARDS         112    /* " */
  476. #define TXT_NOFLIPLEFT        (xpat_messages[105])
  477. #define TXT_NODEAL        (xpat_messages[112])
  478. #define TXT_NOCARDSLEFT        (xpat_messages[113])
  479. #define TXT_MOVEBLOCK        116
  480. #define TXT_SCOREBLOCK        120
  481.  
  482. extern int rng;
  483.